<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Administrator Add Application</title>
<link href="../css/common.css" rel="stylesheet" type="text/css" />
<link href="../css/page.css" rel="stylesheet" type="text/css" />
<link href="../css/base.css" rel="stylesheet" type="text/css" />
</head>
<body>

	<div class="container">
		<div class="header content">
			<h1 class="lead">Web Project</h1>
		</div>
		<div class="main-menu">
			<ul>
				<li><a href="pagetransfer_appAddPage">添加应用</a></li>
				<li><a href="pagetransfer_appsPage">应用列表</a></li>
				<li><a href="pagetransfer_pwdChangePage">修改密码</a></li>
                <li><a href="admin_logout">退出</a></li>
			</ul>
		</div>
		<div class="main-containt">

			<div>
				<%
					String addStatus = request.getParameter("changeStatus");
					if (addStatus != null) {
						if (addStatus.equals("1")) {
							out.print("修改成功");
						} else if (addStatus.equals("0")) {
							out.print("修改失败");
						}
					}
				%>
			</div>
			<form action="appchange_updateApplication" method="post">
				<div>
					<input type="text" name="app.id"
						value="<s:property value="application.id"/>" style="display: none">
				</div>
				<div>
					<label>名称：</label> <input type="text" name="app.name"
						value="<s:property value="application.name"/>" />
				</div>
				<div>
					<label>简介：</label> <input type="text" name="app.description"
						value="<s:property value="application.description"/>" />
				</div>
				<div>
					<label>版本：</label> <input type="text" name="app.version"
						value="<s:property value="application.version"/>" />
				</div>
				<div>
					<input id="input-app" name="app.downloadUrl"
						value="<s:property value="application.downloadUrl"/>"
						style="display: none" />
					<div class="upload">
						<div class="item">应用:</div>
						<div class="item" id="show-app">
							<s:property value="application.downloadUrl" />
						</div>
						<div class="item" id="toggle-app">
							<a class="delete" onClick="deleteApp()">删除</a>
						</div>
						<div class="item" style="display: none" id="upload-app">
							<iframe src="pagetransfer_appUploadPage"></iframe>
						</div>
					</div>
					<div style="clear: both;"></div>
				</div>
				<div>
					<input id="input-icon" name="app.icon"
						value="<s:property value="application.icon"/>"
						style="display: none" />
					<div class="upload">
						<div class="item">图标:</div>
						<div class="item" id="show-icon">
							<a style="cursor: pointer;"
								onclick="preview('..<s:property value="application.icon"/>')">预览</a>
						</div>
						<div class="item" id="toggle-icon">
							<a class="delete" onClick="deleteIcon()">删除</a>
						</div>
						<div id="upload-icon" class="item" style="display: none">
							<iframe src="pagetransfer_iconUploadPage"></iframe>
						</div>
					</div>
					<div style="clear: both;"></div>
				</div>
				<div>
					<input id="input-twodimentcode" name="app.twoDimentCode"
						value="<s:property value="application.twoDimentCode"/>"
						style="display: none" />
					<div class="upload">
						<div class="item">二维码:</div>
						<div class="item" id="show-twodimentcode">
							<a style="cursor: pointer;"
								onclick="preview('..<s:property value="application.twoDimentCode"/>')">预览</a>
						</div>
						<div class="item" id="toggle-twodimentcode">
							<a class="delete" onClick="deleteTwodimentcode()">删除</a>
						</div>
						<div id="upload-twodimentcode" class="item" style="display: none">
							<iframe src="pagetransfer_twodimentcodeUploadPage"></iframe>
						</div>
					</div>
					<div style="clear: both;"></div>
				</div>
				<div>
					<input id="input-screenshots" name="app.screenShot"
						value="<s:property value="application.screenShot"/>"
						style="display: none" />
					<div class="upload">
						<div class="item">截图:</div>
						<div class="item" style="height: auto">
							<div id="show-scrennshots">
								<s:iterator value="application.screenList" id="screenshot"
									status="status">
									<div>
										<a style="cursor: pointer;"
											onclick="preview('..<s:property value="screenshot"/>')">预览</a>
										<a class="delete"
											onclick="deleteScreenshot('<s:property value="screenshot"/>')">删除</a>
									</div>
								</s:iterator>
							</div>
						</div>
					</div>
					<div style="clear: both;"></div>
					<div style="height: 50px;">
						<iframe src="pagetransfer_screenshotsUploadPage"></iframe>
					</div>
				</div>
				<div>
					<input type="submit" value="提交" />
				</div>
			</form>
			<div id="preview-image"
				style="display: none; width: 600px; height: 500px; background-color: rgb(214, 209, 209); position: fixed; top: 50px; left: 300px; opacity: 0.6; border-radius: 10px; box-shadow: 5px 5px 5px gray;">
				<img class="preview" src=""
					style="display: block; margin: 10px auto; max-width: 500px; max-height: 450px;" />
				<div style="position: absolute; bottom: 0px; left: 290px;">
					<button onClick="closePreview()">关闭</button>
				</div>
			</div>
		</div>
		<div class="bottom_container content">
			Copyright@2012-2013<br>
		</div>
	</div>

	</div>
	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/change.app.atachment.js"></script>

</body>
</html>